<!DOCTYPE html>
<html lang="zh-cn">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="yes" name="apple-mobile-web-app-capable"/>
<meta content="yes" name="apple-touch-fullscreen"/>
<meta content="telephone=no" name="format-detection"/>
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1;user-scalable=no;">
<title>我要推广</title>
<link rel="stylesheet" href="../addons/eso_sale/style/css/bootstrap.css?t=1420181396">
<link rel="stylesheet" href="../addons/eso_sale/style/css/stylef.css?t=1420181396">

</head>
<body class="">

<div class="maincontainer">
    <div class="container itemdetail mini-innner">
        <div class="row">
            <div class="col-md-12 p0">
                <div class="wx_bar">
                    <div class="wx_bar_back"><a id="indexBack" href="javascript:history.back();"></a></div>
                    <div class="wx_bar_tit">点击左侧箭头回产品页</div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12 tal p10">


                <div class="form-group p10 mb0">
                    <label for="exampleInputEmail1">方式一：直接转发朋友或是分享朋友圈</label>
                    <div class="highlight">
                        <pre><code class="html" id="fe_text">点击首页或是产品页右上角分享按钮，点击发送给朋友，或是分享到朋友圈，朋友点击过来，购买了产品，您就可以赚取佣金了！</code></pre>
                    </div>
                </div>


                <div class="form-group p10 mb0">
                    <label for="exampleInputEmail1">方式二：使用您的专属推广链接</label>
                    <div class="highlight">
                        <pre><code class="html" id="fe_text">{$goods['title']}{php echo $_W['siteroot'].'app/'.$this->mturl('detail',array('mid'=>$id,'id'=>$gid))}</code></pre>
                    </div>
                </div>



                <p class="bg-success p10" style="color:#333;">*小提示：长按链接,即可复制。将专属链接转发给好友或是分享到朋友圈，即可获得奖励。</p>


                <div class="form-group p10 mb0">
                    <label for="exampleInputEmail1">方式三：专属二维码推广</label>
                    <div class="highlight">
                        <pre><img style=" float:left;margin-right:10px;" src="../addons/eso_sale/style/images/share/share{$id}.png"><span>让好友扫描左侧您的专属二维码，也可以发送二维码给朋友或是分享到朋友圈，朋友扫描过来，购买了产品，您就可以赚取佣金了！</span></pre>
                    </div>
                </div>
                <div class="activity_container">
                    <div class="title"><h3>推广赚钱：</h3></div>
                    <div class="activity_text tal">
                        {$rule}
                    </div>
                </div>

            </div>
        </div>
    </div>

</div>
<script type="text/javascript"><!--分享按钮-->
$(document).ready(function(){
    $("#share-overlay").click(function(){
        var parent = document.getElementById("share-overlay");
        $("#share-overlay").removeClass("share-block");
        parent.className = parent.className + " share-none";
        var parent2 = document.getElementById("share-wrap");
        $("#share-wrap").removeClass("share-block");
        parent2.className = parent2.className + " share-none";
    });
    $("#share-wrap").click(function(){
        var parent3 = document.getElementById("share-overlay");
        $("#share-overlay").removeClass("share-block");
        parent3.className = parent3.className + " share-none";
        var parent4 = document.getElementById("share-wrap");
        $("#share-wrap").removeClass("share-block");
        parent4.className = parent4.className + " share-none";
    });
    $("#share_btn").click(function(){
        var parent5 = document.getElementById("share-overlay");
        $("#share-overlay").removeClass("share-none");
        parent5.className = parent5.className + " share-block";
        var parent6 = document.getElementById("share-wrap");
        $("#share-wrap").removeClass("share-none");
        parent6.className = parent6.className + " share-block";
    });
});
</script>
<div id="share-overlay" style="display:none;"></div>
<div class="container mini-innner p0">
    <div id="share-wrap" style="z-index: 1101;opacity: 1;outline: none;display: none;">
        <img class="lazy img-responsive" src="../addons/eso_sale/style/images/share_distribution.png" data-src="../addons/eso_sale/style/images/share_distribution.png" alt="不妨分享给亲友邀请他们一起来试吃吧！">
    </div>
</div>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript">
    //获取指定cookes函数
    function getCookie(name)
    {
        var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");

        if(arr=document.cookie.match(reg))

            return unescape(arr[2]);
        else
            return null;
    }

    if(navigator.appName == 'Microsoft Internet Explorer'){
        if(navigator.userAgent.indexOf("MSIE 5.0")>0 || navigator.userAgent.indexOf("MSIE 6.0")>0 || navigator.userAgent.indexOf("MSIE 7.0")>0) {
            alert('您使用的 IE 浏览器版本过低, 推荐使用 Chrome 浏览器或 IE8 及以上版本浏览器.');
        }
    }

    // jssdk config 对象
    jssdkconfig = {php echo json_encode($_W['account']['jssdkconfig']);} || {};
    // 是否启用调试
    jssdkconfig.debug = false;
    //
    jssdkconfig.jsApiList = [
        'checkJsApi',
        'onMenuShareTimeline',
        'onMenuShareAppMessage',
        'onMenuShareQQ',
        'onMenuShareWeibo',
        'hideMenuItems',
        'showMenuItems',
        'hideAllNonBaseMenuItem',
        'showAllNonBaseMenuItem',
        'translateVoice',
        'startRecord',
        'stopRecord',
        'onRecordEnd',
        'playVoice',
        'pauseVoice',
        'stopVoice',
        'uploadVoice',
        'downloadVoice',
        'chooseImage',
        'previewImage',
        'uploadImage',
        'downloadImage',
        'getNetworkType',
        'openLocation',
        'getLocation',
        'hideOptionMenu',
        'showOptionMenu',
        'closeWindow',
        'scanQRCode',
        'chooseWXPay',
        'openProductSpecificView',
        'addCard',
        'chooseCard',
        'openCard'
    ];

    var wxData = {
        //"appId": "{$_W['account']['key']}",
        "imgUrl" : '{$_W['attachurl']}{$logo}',
        "link" : '{php echo $_W['siteroot']."app/".$this->mturl('list',array('id'=>$id))}&mid='+getCookie("mid"),
        "desc" : '{$description}',
        "title" : '{$_W['account']['name']}'
    };


    wx.config(jssdkconfig);
    wx.ready(function () {
        wx.onMenuShareAppMessage(wxData);
        wx.onMenuShareTimeline(wxData);
        wx.onMenuShareQQ(wxData);
        wx.onMenuShareWeibo(wxData);
    });
</script>
</body>
</html>